package safe

import (
	"encoding/json"
	"net/http"
)

func BodyCheck(request *http.Request, body *map[string]interface{}) error {
	decoder := json.NewDecoder(request.Body)
	err := decoder.Decode(body)
	if err != nil {
		return err
	}
	return nil
}
